Page({  
  data: {  
    imgList: [  
      { url: "cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/banner/banner2.png" },  
     
    ],  
    swiperHeight: 300,
    /// 产品
    gridData: [
      {
        imageUrl: 'cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/goods/超声波震板p.png',
        title: '震板系列',
        proIndex: 6,
      },
      {
        imageUrl: 'cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/goods/超声波小功率钛棒.png',
        title: '震棒系列',
        proIndex: 7,
      },
      {
        imageUrl: 'cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/goods/单多槽系列.png',
        title: '单槽/多槽系列',
        proIndex: 1,
      },

      {
        imageUrl: 'cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/goods/全自动精密零配件清洗机.png',
        title: '超声波自动清洗线',
        proIndex: 0,
      }
    ],

    /// 场景
    sceneData: [
      {
        imageUrl: 'cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/goods/小金属冲压件清洗场景.png',
        title: '五金清洗',
        sceneIndex: 0,
      },
      
      {
        imageUrl: 'cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/goods/橡胶模具清洗.png',
        title: '模具清洗',
        sceneIndex: 1,
      },
      {
        imageUrl: 'cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/goods/光学树脂镜片清洗.png',
        title: '光学清洗',
        sceneIndex: 3,
      },
      {
        imageUrl: 'cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/goods/养殖场污水处理.png',
        title: '净化水质',
        sceneIndex: 5,
      },
    ],

    videoData: {
      src: 'cloud://cloud1-7gexn9ti7088c614.636c-cloud1-7gexn9ti7088c614-1358457931/images/other/homeVideo.mp4',
      title: '自动线清洗演示视频',
      subtitle: '五金超声波自动清洗线',
      desc: '一般工艺流程：超声波粗洗-精洗-漂洗-慢拉-烘干，可根据实际清洗要求调整工艺数量。'
    },
    content: '18588957023',
    add: '广东省中山市三乡镇碧华大道16号·梵英超声',
  },  
  onLoad() {  
    // 动态适配高度  
    const systemInfo = wx.getSystemInfoSync();  
    this.setData({  
      swiperHeight: systemInfo.windowWidth * 0.75  
    });  
  },

  onGridItemTap(e:any) {
    const index = e.currentTarget.dataset.index;
    wx.switchTab({
      url: '/pages/product/product'
    });
    wx.setStorageSync('proTabIndex', index);
  },

  onGridSceneItemTap(e:any) {
    const index = e.currentTarget.dataset.index;
    wx.switchTab({
      url: '/pages/scene/scene'
    });
    wx.setStorageSync('sceneTabIndex', index);
  },

  onbannerItemTap() {
    wx.navigateTo({
      url: `/pages/book_pages/book_pages` 
    });
  },

  handlePlay() {
    this.selectComponent('.video').play()
  },

  onShareAppMessage() {

  },
  onShareTimeline() {
    return {
      title: '梵英超声', 
    }
  },

  onCopy(e:any) {
    wx.setClipboardData({
      data: e.currentTarget.dataset.text.toString(),
      success: function () {
        wx.showToast({ title: '复制成功' });
      }
    });
  },

});  
